package com.hnkywl.sts.entity.sys;

import com.hnkywl.sts.entity.BaseEntity;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * 说明：
 * 包:        com.hnkywl.sts.entity.sys
 * 类描述:    规格
 * 创建人:    zcg
 * 创建时间: 13-2-18 上午10:24
 * 修改人:    zcg
 * 修改时间: 13-2-18 上午10:24
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Entity
@Table(name = "T_SYS_GG")
public class Gg extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqGg", allocationSize = 1, sequenceName = "SEQ_SYS_GG")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqGg")
    private Long id;
    /**
     * 物资名称
     */
    @Column(name = "name", length = 2000)
    private String name;
    /**
     * 规格代码
     */
    @Column(name = "code", length = 2000)
    private String code;

    /**
     * 老系统规格代码
     */
    @Column(name = "oldcode", length = 2000)
    private String oldcode;

    /**
     * 规格型号
     */
    @Column(name = "ggxh", length = 2000)
    private String ggxh;
    /**
     * 规格简称
     */
    @Column(name = "ggjc", length = 2000)
    private String ggjc;
    /**
     * 图号
     */
    @Column(name = "th", length = 2000)
    private String th;
    /**
     * 材质
     */
    @Column(name = "cz", length = 2000)
    private String cz;
    /**
     * 单位
     */
    @Column(name = "dw")
    private String dw;

    /**
     * 数量单位
     */
    @Column(name = "sldw")
    private String sldw;
    /**
     * 是否报价
     */
    @Column(name = "sfbj")
    private Boolean sfbj = false;
    /**
     * 品名
     */
    @ManyToOne
    @JoinColumn(name = "pm_id")
    @Where(clause = "deleted!='1'")
    private Pm pm;

    @Column(name = "PM_CODE")
    private String pmCode;

    @Column(name = "CZ_CODE")
    private String czCode;

    @Column(name = "GG_CODE")
    private String ggCode;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSldw() {
        return sldw;
    }

    public void setSldw(String sldw) {
        this.sldw = sldw;
    }

    public Boolean getSfbj() {
        return sfbj;
    }

    public void setSfbj(Boolean sfbj) {
        this.sfbj = sfbj;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getOldcode() {
        return oldcode;
    }

    public void setOldcode(String oldcode) {
        this.oldcode = oldcode;
    }

    public String getGgxh() {
        return ggxh;
    }

    public void setGgxh(String ggxh) {
        this.ggxh = ggxh;
    }

    public String getGgjc() {
        return ggjc;
    }

    public void setGgjc(String ggjc) {
        this.ggjc = ggjc;
    }

    public String getTh() {
        return th;
    }

    public void setTh(String th) {
        this.th = th;
    }

    public String getCz() {
        return cz;
    }

    public void setCz(String cz) {
        this.cz = cz;
    }

    public String getDw() {
        return dw;
    }

    public void setDw(String dw) {
        this.dw = dw;
    }

    public boolean isSfbj() {
        return sfbj;
    }

    public void setSfbj(boolean sfbj) {
        this.sfbj = sfbj;
    }

    public Pm getPm() {
        return pm;
    }

    public void setPm(Pm pm) {
        this.pm = pm;
    }

    public String getPmCode() {
        return pmCode;
    }

    public void setPmCode(String pmCode) {
        this.pmCode = pmCode;
    }

    public String getCzCode() {
        return czCode;
    }

    public void setCzCode(String czCode) {
        this.czCode = czCode;
    }

    public String getGgCode() {
        return ggCode;
    }

    public void setGgCode(String ggCode) {
        this.ggCode = ggCode;
    }
}
